Add comprehensive unit tests for authentication service (issue #6) -…#8
Open
Ashish1896 wants to merge 3 commits intoCodeForChangeBH:mainfrom
Open
Add comprehensive unit tests for authentication service (issue #6) -…#8Ashish1896 wants to merge 3 commits intoCodeForChangeBH:mainfrom
Ashish1896 wants to merge 3 commits intoCodeForChangeBH:mainfrom
Conversation
…rChangeBH#6) - User registration tests (valid data, duplicate email validation) - User login tests (correct and incorrect credentials) - JWT token generation and validation tests - Password hashing and comparison tests - Nigerian phone number format validation tests - Target coverage: 80%+ with Jest framework
…- Zod schema for comprehensive form validation - Description: 10-1000 characters - Location: Valid lat/lng coordinates - Category: enum of incident types - Contact: Optional phone (+234XXXXXXXXXX) or email - Photos: Max 5 files, 5MB each, image types only
…hangeBH#4) - Comprehensive server-side validation for incident reports - Returns 400 for invalid submissions with detailed errors - Returns 201 for valid submissions - Validates: description, location, category, contact, photos - Prevents SQL injection through strict schema validation Implement POST endpoint for incident report submission with validation.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
… User registration tests (valid data, duplicate email validation) - User login tests (correct and incorrect credentials) - JWT token generation and validation tests - Password hashing and comparison tests - Nigerian phone number format validation tests - Target coverage: 80%+ with Jest framework